﻿<%@ Page Language="C#" MasterPageFile="~/Templates/top.master" AutoEventWireup="true" CodeFile="order-pay.aspx.cs" Inherits="cart_pay" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="cart-index" class="CartWrap"> 
        <table width="100%">
            <tr style="height:80px;"><td valign="top" style="background-color:#ffffff;"><img alt="购物流程--查看购物车" src="img/themes/cartnav-step4.gif" /></td><td valign="top" style="background-color:#ffffff;"><img src="img/themes/cartnav-cart.gif" /></td></tr>
        </table>
        <div style="width:100%; background-color:#ffffff;">
            <table style="margin-left:50px;" cellpadding="3">
                <tr style="height:40px;"><td rowspan="2" valign="middle"><div class="icon-succ02 "></div></td><td style="font-size:16px; color:#009900">订单提交成功，请您尽快付款！</td></tr>
                <tr><td style="color:#666666; font-size:13px; font-weight:normal;">订单号：<asp:Label ID="lblOrderNO"  runat="server" Text=""></asp:Label> &nbsp; | &nbsp;  应付金额为： 
                    <span style="color:#f00000;"><asp:Label ID="lblMoney" runat="server" Text=""></asp:Label>元</span></td></tr>
            </table>
            <hr />
            <div style="margin-left:50px; margin-top:20px; margin-right:20px;  ">
                
                <div id="divSelePayMethod" style="border:solid 1px #EDD28B; background-color:#FFFBEE;">
                    <div  style="margin-top:10px;  margin-left:30px;" > 
                        <span style="font-size:14px; color:#ff6600;">选择支付平台</span>
                        <span style="font-size:12px; font-weight:normal;   color:#888888;">(当前仅支持支付宝平台)</span>
                    </div>
                    <div id="divPay" style="margin-top:20px;margin-left:50px; font-size:12px; font-weight:normal;   color:#888888;"> 
                        平台支付
                        <table style="width:95%;">
                            <tr>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" checked value="支付宝" name="payMethod" img="biglogo_03.jpg" /></td><td><img src="img/bank/biglogo_03.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="在线支付" name="payMethod" img="unionpay.png" /></td><td><img src="img/bank/unionpay.png" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="财付通" name="payMethod" img="tenpay.png" /></td><td><img src="img/bank/tenpay.png" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="快钱" name="payMethod" img="99bill.png" /></td><td><img src="img/bank/99bill.png" alt="" class="paymethod" /></td>
                            </tr>
                        </table>
                        <hr />
                    
                    </div>
                    <div id="div1" style="margin-top:30px;margin-left:50px; font-size:12px; font-weight:normal;   color:#888888;"> 
                        网银支付
                        <table style="width:95%;" >
                            <tr style="height:50px;">
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国银行" name="payMethod" img="bank_03.jpg" /></td><td><img src="img/bank/bank_03.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国工商银行" name="payMethod" img="bank_05.jpg" /></td><td><img src="img/bank/bank_05.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国建设银行" name="payMethod" img="bank_07.jpg" /></td><td><img src="img/bank/bank_07.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国农业银行" name="payMethod" img="bank_09.jpg" /></td><td><img src="img/bank/bank_09.jpg" alt="" class="paymethod" /></td>
                            </tr>
                            <tr style="height:50px;">   
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="交通银行" name="payMethod" img="bank_11.jpg" /></td><td><img src="img/bank/bank_11.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="招商银行" name="payMethod" img="bank_18.jpg" /></td><td><img src="img/bank/bank_18.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="华夏银行" name="payMethod" img="bank_19.jpg" /></td><td><img src="img/bank/bank_19.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国民生银行" name="payMethod" img="bank_20.jpg"  /></td><td><img src="img/bank/bank_20.jpg" alt="" class="paymethod" /></td>
                            </tr>
                            <tr style="height:50px;">   
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="兴业银行" name="payMethod" img="bank_21.jpg"  /></td><td><img src="img/bank/bank_21.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中国光大银行" name="payMethod" img="bank_22.jpg" /></td><td><img src="img/bank/bank_22.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="中信银行" name="payMethod" img="bank_28.jpg"  /></td><td><img src="img/bank/bank_28.jpg" alt="" class="paymethod" /></td>
                                <td valign="middle" style=" vertical-align:middle;"><input type="radio" disabled="disabled" value="广东发展银行" name="payMethod" img="bank_30.jpg" /></td><td><img src="img/bank/bank_30.jpg" alt="" class="paymethod" /></td>
                            </tr>
                        </table> <br />
                        <input type="button" onclick="SelectPayMethod()" class="btn-surepay" /><br />&nbsp;
                        
                    </div>
                     
                </div>
            
                <div id="divConfimPayMethod" style="border:solid 1px #EDD28B; display:none; background-color:#FFFBEE;">
                    <div  style="margin-top:10px;  margin-left:30px;" > 
                        <div style="font-size:14px; color:#888888;">您已选择的支付方式：</div>
                        <div style="font-size:12px; margin-top:20px; font-weight:normal;   color:#888888;">
                            <span><img class="paymethod" id="imgConfirm" /></span>
                            <span style="margin-left:30px; color:#888888; padding-bottom:10px;"><a href="javascript:ReSelectPayMethod();">[重新选择]</a></span>
                        </div>
                        <div style="margin-top:20px;">
                            <input id="btnPay" runat="server" class="btn-quickpay" value="" onclick="Pay()" />
                        </div>
                        <br />
                        <div style="visibility:hidden" >
                            <asp:TextBox ID="txtPayMethode" runat="server"></asp:TextBox>
                            <asp:TextBox ID="orderNO" runat="server"></asp:TextBox>
                            <asp:TextBox ID="orderId" runat="server"></asp:TextBox>
      
  
                        </div>
                        <br />
                    </div>
                    
                </div>
            </div>
            <div style="height:100px;"></div>
        </div>
        
    </div>
    <div class="popMask" style="opacity:0.5; display:none;z-index:10003"></div>
    <div class="pop" style="min-width:380px;left:472px;top:350px;z-index:10005;display:none;">
        <div class="popc">
            <div class="poptit">
                <h2>提示</h2>
                <a class="cls"></a>
            </div>
            <div>
                <dl class="ts">
                   <dt></dt>
                   <dd>
                        <strong>请在新打开的银行页面中完成付款！</strong>
                        <p>付款未完成前请不要关闭此页面！</p>
                        <p>请根据您的支付情况选择下面按钮！</p>
                   </dd> 
                </dl>
                <div class="popb">
                    <input id="btn1" type="button" value="已完成付款" class="btn" />
                    <input id="btn2" type="button" value="付款遇到问题" class="btn" />
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" language="javascript">
        function SelectPayMethod()
        {
            var payMehodRadios = document.getElementsByName("payMethod");
            var bFind = false;            
            var rdo;
            var payMethod = "";
            for(var i=0; i<payMehodRadios.length;i++)
            {
                rdo = payMehodRadios[i];
                if(rdo.checked)
                {
                    bFind = true;
                    payMethod = rdo.value;
                    break;
                }
            }
            if(bFind)
            {
                document.getElementById("divSelePayMethod").style.display="none";
                document.getElementById("divConfimPayMethod").style.display="block";
                document.getElementById("imgConfirm").src = "./img/bank/" + rdo.getAttribute("img");
                document.getElementById('<%= this.txtPayMethode.ClientID %>').value = payMethod;
                
            }
        }
        function ReSelectPayMethod()
        {
            document.getElementById("divSelePayMethod").style.display="block";
                document.getElementById("divConfimPayMethod").style.display="none";
        }
        
        $$('.popMask').setStyle('display','none').hide();
        $$('.pop').setStyle('display','none').hide();
        function Pay()
        {
            var orderId =  document.getElementById('<%= this.orderId.ClientID %>').value ;
            var orderNO =  document.getElementById('<%= this.orderNO.ClientID %>').value ;
            var payMethod = document.getElementById('<%= this.txtPayMethode.ClientID %>').value;
            if(payMethod == "支付宝" )
            {
                window.open("Alipay.aspx?orderId=" + orderId + "&orderNO=" + orderNO);
            }
            
            $$('.popMask').setStyle('display','block').show();
            $$('.pop').setStyle('display','block').show();
        }
        
        $('.cls').click(function(){
            $('.popMask').setStyle('display','none').hide();
            $('.pop').setStyle('display','none').hide();
        });
        $('#btn1').click(function(){
            window.location.href="member-orders.aspx";
        });
        
        $('#btn2').click(function(){
            window.open("http://help.alipay.com/lab/index.htm");
        });
    </script>
</asp:Content>

